package com.so206.po;

import java.io.Serializable;
import java.util.Date;

public class SysFunction implements Serializable {
    /**
    * 自增id
    */
    private Long id;

    /**
    * 权限值
    */
    private String funName;

    /**
    * 权限描述
    */
    private String funDescp;

    /**
    * 权限路径
    */
    private String funPath;

    /**
    * 父id,0为顶级菜单
    */
    private Long parent;

    /**
    * 状态:0.禁用,1.启用
    */
    private Integer status;

    /**
    * 操作时间
    */
    private Date optTime;

    /**
    * 是否为菜单:0.不是,1.是
    */
    private Integer isMenu;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFunName() {
        return funName;
    }

    public void setFunName(String funName) {
        this.funName = funName;
    }

    public String getFunDescp() {
        return funDescp;
    }

    public void setFunDescp(String funDescp) {
        this.funDescp = funDescp;
    }

    public String getFunPath() {
        return funPath;
    }

    public void setFunPath(String funPath) {
        this.funPath = funPath;
    }

    public Long getParent() {
        return parent;
    }

    public void setParent(Long parent) {
        this.parent = parent;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getOptTime() {
        return optTime;
    }

    public void setOptTime(Date optTime) {
        this.optTime = optTime;
    }

    public Integer getIsMenu() {
        return isMenu;
    }

    public void setIsMenu(Integer isMenu) {
        this.isMenu = isMenu;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", funName=").append(funName);
        sb.append(", funDescp=").append(funDescp);
        sb.append(", funPath=").append(funPath);
        sb.append(", parent=").append(parent);
        sb.append(", status=").append(status);
        sb.append(", optTime=").append(optTime);
        sb.append(", isMenu=").append(isMenu);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysFunction other = (SysFunction) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFunName() == null ? other.getFunName() == null : this.getFunName().equals(other.getFunName()))
            && (this.getFunDescp() == null ? other.getFunDescp() == null : this.getFunDescp().equals(other.getFunDescp()))
            && (this.getFunPath() == null ? other.getFunPath() == null : this.getFunPath().equals(other.getFunPath()))
            && (this.getParent() == null ? other.getParent() == null : this.getParent().equals(other.getParent()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getOptTime() == null ? other.getOptTime() == null : this.getOptTime().equals(other.getOptTime()))
            && (this.getIsMenu() == null ? other.getIsMenu() == null : this.getIsMenu().equals(other.getIsMenu()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFunName() == null) ? 0 : getFunName().hashCode());
        result = prime * result + ((getFunDescp() == null) ? 0 : getFunDescp().hashCode());
        result = prime * result + ((getFunPath() == null) ? 0 : getFunPath().hashCode());
        result = prime * result + ((getParent() == null) ? 0 : getParent().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getOptTime() == null) ? 0 : getOptTime().hashCode());
        result = prime * result + ((getIsMenu() == null) ? 0 : getIsMenu().hashCode());
        return result;
    }
}